package controlador;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.List;

import modelo.Ingrediente;
import modelo.IngredienteDAO;
import modelo.ProbarMetodosFabricaCreador;
import vista.VentanaIngredienteModeloTabla;
import vista.VentanaPrincipalMagnifico;

public class ControladorVentanaPrincipalMagnifico implements ActionListener {

        private VentanaPrincipalMagnifico ventanaPrincipal;

        public ControladorVentanaPrincipalMagnifico() {
                super();
                this.ventanaPrincipal = new VentanaPrincipalMagnifico();
                this.ventanaPrincipal.addListener(this);
                this.ventanaPrincipal.setVisible(true);
        }

        @Override
        public void actionPerformed(ActionEvent e) {
                if (e.getActionCommand().equals("Tomar Orden")){
                        new ControladorVentanaOrden();
                }
                else if(e.getActionCommand().equals("Gestionar Categoria")){    
                	    new ControladorCategoria();
                }
                else if  (e.getActionCommand().equals("Gestionar Producto")){ 
                        new ControladorVentanaProducto();
                }
                else if  (e.getActionCommand().equals("Cantidad Disponible de Ingredientes")){ 
                        new ControladorIngrediente();
                }
                else if  (e.getActionCommand().equals("Venta de Productos")){ 
                        new ControladorDetalleOrden();
                }
                else if(e.getActionCommand().equals("Comprar Ingredientes")){
                        new ControladorVentanaCompraIngredientes();
                }
                else if(e.getActionCommand().equals("Salir"))
                        System.exit(0);
                
        }
}
